package com.xyy.saas.payment.payment.core.conversion;

import com.xyy.saas.payment.cores.bo.PrepayBo;
import com.xyy.saas.payment.cores.bo.RefundBo;
import com.xyy.saas.payment.payment.core.dto.WithdrawalDto;
import com.xyy.saas.payment.payment.core.vo.WithdrawalVO;

/**
 * @author wangtianqi
 * @date 2019/11/25 19:59
 */
public class ConversionVO {

    /**
     * 构建预支付返回数据
     */
    public static PrepayBo buildPrepayVO(PrepayBo prepayBo) {
        PrepayBo prepayVO = new PrepayBo();
        prepayVO.setPayNo(prepayBo.getPayNo());
        prepayVO.setUserId(prepayBo.getUserId());
        return prepayVO;
    }


    public static RefundBo buildRefundBo(String refundNo) {
        RefundBo refundBo = new RefundBo();
        refundBo.setRefundNo(refundNo);
        return refundBo;
    }


    public static WithdrawalVO buildWithdrawalVO(WithdrawalDto withdrawalDto) {
        WithdrawalVO withdrawalVO = new WithdrawalVO();
        withdrawalVO.setWithdrawalNo(withdrawalDto.getWithdrawalNo());
        withdrawalVO.setAmount(withdrawalDto.getAmount());
        withdrawalVO.setFee(withdrawalDto.getFee());
        return withdrawalVO;
    }

}
